package www.xpu.edu.app;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;

import java.util.List;

public class Adapter_job3 extends ArrayAdapter<Job3> {
    private int id;
    public Adapter_job3(Context context, int resource, List<Job3> objects) {
        super(context, resource, objects);
        id=resource;

    }

    @Override
    public View getView(int position, View convertView,ViewGroup parent) {
        //return super.getView(position, convertView, parent);
        Job3 job3=getItem(position);
        final View view=LayoutInflater.from(getContext()).inflate(id,parent,false);
        TextView text1=view.findViewById(R.id.resume_text1);
        TextView text2=view.findViewById(R.id.resume_text2);
        TextView text3=view.findViewById(R.id.resume_text3);
       /* Button button1=view.findViewById(R.id.resume_button1);
        Button button2=view.findViewById(R.id.resume_button2);*/
        text1.setText(job3.getName());
        text2.setText(job3.getGrad());
        text3.setText(job3.getSchool());
       /* button1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(view.getContext(),"点击了查看详细按钮,功能正在开发中",Toast.LENGTH_LONG).show();
            }
        });
        button2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(view.getContext(),"点击了删除按钮，功能正在开发中",Toast.LENGTH_LONG).show();
            }
        });*/
        return view;

    }
}
